int height)
{
int i;
+ double target_scale;
cairo_format_t format;
cairo_surface_t *image;
cairo_t *cr;
+ target_scale = 0.0;
+ for (i = 0; i < n_captures; i++)
+ {
+ ClutterCapture *capture = &captures[i];
+ double capture_scale = 1.0;
+
+ cairo_surface_get_device_scale (capture->image, &capture_scale, NULL);
+ target_scale = MAX (target_scale, capture_scale);
+ }
+
format = cairo_image_surface_get_format (captures[0].image);
- image = cairo_image_surface_create (format, width, height);
+ image = cairo_image_surface_create (format,
+ width * target_scale,
+ height * target_scale);
+ cairo_surface_set_device_scale (image, target_scale, target_scale);
cr = cairo_create (image);
for (i = 0; i < n_captures; i++)
{
ClutterCapture *capture = &captures[i];
- double capture_scale = 1.0;
-
- /*
- * Ignore capture regions with scale other than 1 for now; mutter can't
- * produce them yet, so there is no way to test them.
- */
- cairo_surface_get_device_scale (capture->image, &capture_scale, NULL);
- if ((int) capture_scale != 1)
- continue;
cairo_save (cr);